<?php
    require_once './model/db.php';
    require_once './model/categories.php';
    $obj = new categories();
    $data = $obj->xemca();
?>
<!-- start sidebar two -->
<div id="sidebar2" class="sidebar">
    <ul>
        <li>
            <h2>Categories</h2>
            <ul>
                <?php foreach ($data as $value){?>
                <li><a href="<?php echo "index_cate.php?view1=".$value["id"]?>"> <?php echo $value["name"];?></a></li>
                <?php }?>
            </ul>
        </li>			
    </ul>
</div>
<!-- end sidebar two -->